/********************************************************************************
 *      Copyright:  (C) 2022 guoyi<675088383@qq.com>
 *                  All rights reserved.
 *
 *       Filename:  conf.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(25/12/21)
 *         Author:  guoyi<675088383@qq.com>
 *      ChangeLog:  1, Release initial version on "25/12/21 08:12:03"
 *                 
 ********************************************************************************/

#ifndef __CONF_H_
#define __CONF_H_

#include "iniparser.h"
#include "dictionary.h"

typedef struct client_ctx_s
{
    char     *serv_ip;
    int       serv_port;
    int       interval;
    char     *devid;
    char     *logconf;
    char     *db_name;
}client_ctx_t;

typedef struct server_ctx_s
{
    int       serv_port;
    char     *logconf;
    char     *db_name;
}server_ctx_t;

extern int client_parser_conf(const char *conf_file, client_ctx_t  *ctx);
extern int server_parser_conf(const char *conf_file, server_ctx_t  *ctx);

#endif
